﻿/// <summary>
/// Summary description for WebPageBase
/// </summary>
public class WebPageBase : System.Web.UI.Page
{

    public DBDataContext db = new DBDataContext();
    private UserQ _user;

    public WebPageBase()
	{
		//
		// TODO: Add constructor logic here
		//
	}

    public UserQ UserSystem
    {
        get {
            if (_user == null)
                _user = (UserQ)Session["User" + Session.SessionID];
            return _user; 
        }
        set {
            Session["User" + Session.SessionID] = value;
            _user = value; 
        }
    }


    public void LogOut()
    {
        Response.Redirect("Login.aspx?error=Tiempo de sesión expirado. Ingrese nuevamente.");
    }

}
